package 设计模式.单例;

public class singleFactory {

    private static volatile String product = null;

    public static String getProduct() {
        if (product == null)
            synchronized (singleFactory.class) {
                if (product == null) {
                    product = "product";
                }
            }
        return product;
    }
}
